package net.dopan.pigframe.config;

import feign.Feign;
import net.dopan.pigframe.api.fegin.fallback.MenuServiceFallbackImpl;
import net.dopan.pigframe.api.fegin.fallback.OSSServiceFallback;
import net.dopan.pigframe.api.fegin.fallback.UserServiceFallbackImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

/**
 * @Package: net.dopan.pigframe.core.bean.config
 * @Title: FeignDisableHystrixConfiguration
 * @Description: (用一句话描述该文件做什么)
 * @author: 刘宽
 * @date: 2018-09-27 09:48
 */
@Configuration
public class FeignDisableHystrixConfiguration {

    @Bean
    @Scope("prototype")
    public Feign.Builder feignBuilder() {
        return Feign.builder();
    }

    @Bean
    public UserServiceFallbackImpl fb(){
        return new UserServiceFallbackImpl();
    }

    @Bean
    public MenuServiceFallbackImpl fb1(){
        return new MenuServiceFallbackImpl();
    }

    @Bean
    public OSSServiceFallback fb2(){
        return new OSSServiceFallback();
    }
}